///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

package navigator
{

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

import summit.basecamp.wrappers.ProjectWrapper;
import summit.data.AccountToken;
import summit.net.BasecampLoader;

import navigator.ui.ResourceTree;
import navigator.ui.LoginScreen;
import navigator.ui.PropertiesViewer;

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

/**
 * Shared references.
 */
public class State
{
	/**
	 * The main tree control for the application.
	 */
	public static var tree:ResourceTree;
	
	/**
	 * The main DataGrid for the application.
	 */
	public static var viewer:PropertiesViewer;
	
	/**
	 * The login screen for the application.
	 */
	public static var login:LoginScreen;
	
	/**
	 * The account information for Basecamp.
	 */	
	public static var accountToken:AccountToken;
	
	/**
	 * Loader used by application to get most Basecamp data
	 */
	public static var loader:BasecampLoader;
	
	/**
	 * Used to store edit data during an edit operation.
	 */
	public static var editData:Object;
	
	/** Used to get initial list of projects / events around first successful
	 * api calls. **/
	public static var projectWrapper:ProjectWrapper;
	
	/**
	 * A hash of all known Basecamp resources, indexed by id.
	 * 
	 * <p>Beware, in developer communications, 37Signals has noted that
	 * ids come from pool that is unique to each type of resource. This means
	 * that storing ALL resources in a common bucket CAN result in id
	 * collision.</p>
	 */ 
	public static var resources:Object = new Object();
}
}
//////////////////////////////////////////////////////// gmarius@tyemill.com //